Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cli-spinner

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-spinner

A simple spinner

  • 0.2.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is cli-spinner?

The cli-spinner npm package is a simple and customizable spinner for command-line interfaces. It helps to indicate that a process is ongoing, providing a visual cue to users that something is happening in the background.

What are cli-spinner's main functionalities?

Basic Spinner

This feature allows you to create a basic spinner that shows a rotating animation in the terminal. The spinner can be customized with different characters.

const Spinner = require('cli-spinner').Spinner;
const spinner = new Spinner('processing.. %s');
spinner.setSpinnerString('|/-\\');
spinner.start();
setTimeout(() => spinner.stop(true), 5000);

Custom Spinner Strings

This feature allows you to use predefined spinner strings by passing an index to the setSpinnerString method. Each index corresponds to a different spinner animation.

const Spinner = require('cli-spinner').Spinner;
const spinner = new Spinner('loading.. %s');
spinner.setSpinnerString(18);
spinner.start();
setTimeout(() => spinner.stop(true), 5000);

Spinner with Custom Interval

This feature allows you to set a custom delay interval for the spinner animation, making it faster or slower depending on your needs.

const Spinner = require('cli-spinner').Spinner;
const spinner = new Spinner('waiting.. %s');
spinner.setSpinnerString('|/-\\');
spinner.setSpinnerDelay(100);
spinner.start();
setTimeout(() => spinner.stop(true), 5000);

Other packages similar to cli-spinner

Keywords

FAQs

Package last updated on 01 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc